﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
using System.Xml.XPath;

namespace InfoPathHelpers
{
    public interface IDataSourceContext
    {
        /// <summary>
        /// The name of the data source.
        /// </summary>
        string Name { get; }

        bool IsReadOnly { get; }

        /// <summary>
        /// An XPathRoot pointing to the root of the data source.
        /// </summary>
        FixedPositionNavigator Root { get; }

        /// <summary>
        /// An XPathNavigator pointing to the root of the data source.
        /// </summary>
        XPathNavigator Navigator { get; }

        IXmlNamespaceResolver NamespaceManager { get; }

        XPathNavigator SelectSingleNode(string xPath);

        XPathNodeIterator Select(string xPath);

        object Evaluate(string xPath);
    }
}
